﻿namespace Vdc.Window
{
    using System;

    internal class ExpireManager
    {
        private DateTime disableControlDate = new DateTime(0x7db, 11, 1);
        private bool FullVersion = true;
        private DateTime notifyLicenseDate = new DateTime(0x7db, 10, 4);
        private DateTime validStartDate = new DateTime(0x7da, 9, 13);

        public int checkExpired()
        {
            if (this.FullVersion)
            {
                return 1;
            }
            if (DateTime.Compare(DateTime.Now, this.validStartDate) >= 0)
            {
                if (DateTime.Compare(DateTime.Now, this.notifyLicenseDate) < 0)
                {
                    return 1;
                }
                if (DateTime.Compare(DateTime.Now, this.disableControlDate) <= 0)
                {
                    return 2;
                }
            }
            return 0;
        }
    }
}

